<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%><!DOCTYPE html>
<html>
<head>
<title>ENZO后台—导航栏</title>
<%@include file="/WEB-INF/view/common/css.jsp"%>
<%@include file="/WEB-INF/view/common/systemcss.jsp"%>
<style type="text/css">
.addbtn {
	margin-left: 20px;
	margin-top: 10px;
}
</style>
</head>
<body>
	<%@include file="/WEB-INF/view/common/system/header.jsp"%>

	<div class="col-sm-9 col-sm-offset-3 col-lg-10 col-lg-offset-2 main">
		<div class="row">
			<ol class="breadcrumb">
				<li><a href="#"><span class="glyphicon glyphicon-home"></span></a></li>
				<li class="active">导航栏</li>
			</ol>
		</div>
		<div class="row">
			<button class="btn btn-primary addbtn" onclick="nav.add('')"
				type="button">
				<span class="glyphicon glyphicon-plus"></span>&nbsp;新增
			</button>
		</div>
		<table class="table">
			<thead>
				<tr>
					<th>ID
					<th>名称
					<th>地址
					<th>更新时间
					<th>排序
					<th>状态
					<th>操作
				</tr>
			</thead>
			<tbody>
				<c:forEach items="${list }" var="n">
					<tr>
						<td>${n.id }
						<td>${n.name }
						<td>${n.path }
						<td>${n.updatetime }
						<td>${n.sort }
						<td><c:choose>
								<c:when test="${n.status == 0 }">
									<a href="javascript:void(0)" data-toggle="tooltip"
										data-placement="left" title="不可见"><span
										class="glyphicon glyphicon-eye-close"></span></a>
								</c:when>
								<c:when test="${n.status == 1 }">
									<a href="javascript:void(0)" data-toggle="tooltip"
										data-placement="left" title="可见"><span
										class="glyphicon glyphicon-eye-open"></span></a>
								</c:when>
							</c:choose>
						<td><a href="javascript:void(0)" onclick="nav.add('${n.id}')"
							data-toggle="tooltip" data-placement="left" title="编辑"><span
								class="glyphicon glyphicon-pencil"></span></a> <a
							href="javascript:void(0)" data-toggle="tooltip"
							data-placement="left" title="删除"><span
								class="glyphicon glyphicon-remove"></span></a>
					</tr>
				</c:forEach>
			</tbody>
		</table>
	</div>
	<%@include file="/WEB-INF/view/common/system/footer.jsp"%>

	<script type="text/javascript">
		$(function() {
			//tip 进行初始化
			$('[data-toggle="tooltip"]').tooltip();
		})
		var nav = {
			add : function(obj) {
				var id = obj;
				var title = '';
				var url = '';
				if(id==''){
					title = '添加';
					url = '<en:path/>/system/navToAdd.html';
				}else{
					title = '编辑';
					url = '<en:path/>/system/navToAdd.html?id=' + id;
				}
				layer.open({
					type : 2,
					btn : [ '保存', '取消' ],
					title : title,
					area : [ '500px', '380px' ],
					content : url,
					yes:function(){
						
					}
				});
			}

		}
	</script>
</body>
</html>